Part Number Hot Search : 
IRF6616 MBR206 TK7A50D 25002 DKI04077 M10UFG FR104 CA0158M
Product Description
Full Text Search
 

To Download MG87FL6051 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  8051 ? - ? this document contains information on a new product under development by megawin. megawin reserves the right to change or discontinue this product without notice. ? megawin technology co., ltd. 200 5 all rights reserved. 2014/0 3 version a1.0 m g 8 7fel2051_4051_6051 ?
2 m g87fel2051_4051_6051 ? megawin
megawin m g 8 7fel2051_4051_6051 ? 3 ? 80c51 ??? ? mg87fe/l2051 2kb 4051 4kb 6051 6kb ? ?? e 4.5v ~ 5.5v l 2.4v~3.6v ? ?? 12t ??? 48mhz 6t ??? 24mhz - ??? - ? rc ??? - 40~85 ?? +/ - 4% 6 ???? ? isp ? ?? 0.5k/1k/1.5k ~3.5k ? iap 1kb iap ? ? ? 256 ???? ? ram ? flash ????? ??? 3 ??? ? 16 ? / ? pwm - timer pwm ? 8 ?? int3 ? 7 ? 4 ? ? ? uart ????? ? 15 ??? 8 ?? cpu ? ?????? ? ?? idle ? ?? power - down ???? ? ???? ??? /int0 p3.2 /int1 p3.3 /int2 p4.3 /int3 p4 .2 io ? ? 17 io ? p1[7:0] p3[7,5:0] p4.2/int3/xtal2 p4.3/int2/xtal1 ? ??? int2 ? ain0 v+ /p1.0 ain1(v - )/p1.1 p3.6 ? cpu ? ? ? pdip - 20 sop - 20
4 m g87fel2051_4051_6051 ? megawin
megawin m g 8 7fel2051_4051_6051 ? 5 ?? ................................ ................................ ................................ ................................ ................................ ....................... 3 ?? ................................ ................................ ................................ ................................ ................................ ....................... 5 1. ................................ ................................ ................................ ................................ ................................ ............... 7 2. ? ................................ ................................ ................................ ................................ ................................ ........... 8 3. ? ................................ ................................ ................................ ................................ ................................ ....... 9 3.1. ? ................................ ................................ ................................ ................................ ................................ . 9 3.2. pdip - 20 sop - 20 ................................ ................................ ................................ ................ 10 4. 8051 cpu ? ................................ ................................ ................................ ................................ .................... 11 4.1. cpu ? ................................ ................................ ................................ ................................ .................. 11 4.2. cpu ? ................................ ................................ ................................ ................................ ...................... 12 4.3. ??? ................................ ................................ ................................ ................................ ....................... 12 5. ? ................................ ................................ ................................ ................................ ................................ . 14 5.1. ? ................................ ................................ ................................ ................................ ....................... 14 5.2. ?? ram ................................ ................................ ................................ ................................ . 15 6. ??? sfr ................................ ................................ ................................ ................................ .......... 16 6.1. sfr ?? ................................ ................................ ................................ ................................ .................. 16 6.2. sfr ................................ ................................ ................................ ................................ .............. 17 7. i/o ................................ ................................ ................................ ................................ ................................ ........... 19 7.1. i/o ? ................................ ................................ ................................ ................................ ........................ 19 7.2. ? gpio p1/3/4 ? ................................ ................................ ................................ ........................... 19 7.3. p1 ?? ................................ ................................ ................................ ................................ ................. 19 7.4. p3 ?? ................................ ................................ ................................ ................................ ................. 19 7.5. p4 ?? ................................ ................................ ................................ ................................ ................. 20 7.6. gpio ? ................................ ................................ ................................ ................................ ............ 21 8. ................................ ................................ ................................ ................................ ................................ ............. 22 8.1. ?? ................................ ................................ ................................ ................................ ....................... 22 8.2. ?? ................................ ................................ ................................ ................................ ................... 22 9. ? / ................................ ................................ ................................ ................................ ............................ 26 9.1. timer0 timer1 ................................ ................................ ................................ ................................ ......... 26 9.1 .1. ?? 0 ................................ ................................ ................................ ................................ .................. 26 9.1.2. ?? 1 ................................ ................................ ................................ ................................ .................. 26 9.1.3. ?? 2 ................................ ................................ ................................ ................................ .................. 27 9.1.4. ?? 3 ................................ ................................ ................................ ................................ .................. 27 9.1.5. timer0/1 ? ................................ ................................ ................................ ................................ .. 27 9.2. ? 0/1 ? ................................ ................................ ................................ ................................ .... 29 9.3. pwm - timer pwm ? ................................ ................................ ................................ .................... 33 9.3.1. pwm ?? ................................ ................................ ................................ ............................... 33 9.3.2. pwm ?? ................................ ................................ ................................ ........................... 34 9.4. pwm ? ................................ ................................ ................................ ................................ ............ 36 10. uart ................................ ................................ ................................ ................................ .......................... 37 10.1. uart ? ................................ ................................ ................................ ................................ ................... 37 10.2. uart ? ................................ ................................ ................................ ................................ ............... 38 10.3. 13.5 ? ................................ ................................ ................................ ................................ 40
6 m g87fel2051_4051_6051 ? megawin 11. ?? ................................ ................................ ................................ ................................ ......................... 42 11.1. ??? ................................ ................................ ................................ ................................ ........... 42 11.2. ??? ................................ ................................ ................................ ................................ ....... 42 12. ?? wdt ................................ ................................ ................................ ................................ .... 44 12.1. wdt ? ................................ ................................ ................................ ................................ .................... 44 12.2. wdt ? ................................ ................................ ................................ ................................ ................ 44 12.3. wdt ? ................................ ................................ ................................ ................................ ............. 46 13. ................................ ................................ ................................ ................................ ................................ ..... 47 13.1. ? ................................ ................................ ................................ ................................ ........................... 47 14. ? ................................ ................................ ................................ ................................ ............................. 48 14.1. ??? ................................ ................................ ................................ ................................ ....................... 48 14.2. idle ?? ................................ ................................ ................................ ................................ ............ 48 14.3. ?? ................................ ................................ ................................ ................................ ....................... 48 14.4. ? ................................ ................................ ................................ ................................ ....................... 48 14.5. ................................ ................................ ................................ ................................ ....................... 49 14.6. ? i/o gpio ? ................................ ................................ ................................ ................................ . 49 14.7. ??? ................................ ................................ ................................ ................................ ........... 49 15. ??? ................................ ................................ ................................ ................................ ............................. 51 15.1. ??? ................................ ................................ ................................ ................................ ....................... 51 15.2. ??? ................................ ................................ ................................ ................................ ................... 51 16. ? isp ................................ ................................ ................................ ................................ ................ 53 17. ? ? iap ................................ ................................ ................................ ................................ ... 55 17.1. iap ? ................................ ................................ ................................ ................................ ............... 56 18. ???? ................................ ................................ ................................ ................................ ...... 57 19. ?? ................................ ................................ ................................ ................................ ..................... 58 20. ?? ................................ ................................ ................................ ................................ ............. 59 21. ................................ ................................ ................................ ................................ ............................. 60 21.1. ? ................................ ................................ ................................ ................................ ....................... 60 22. ?? ................................ ................................ ................................ ................................ ............................. 61 23. ? ................................ ................................ ................................ ................................ ............................. 63 24. ?? ................................ ................................ ................................ ................................ ............................. 67
megawin m g 8 7fel2051_4051_6051 ? 7 1. mg87fe/l 2051/4051 /6051 ? 8 ?? ?????? 80c51 ??? ? 2k/4k/ 6 k ?? ? 256 ??????????? ???3????? 6 12 ? ?? ? 8 io (p1) ? 7 io ? p30~p35 p37 2 16 ?? / ? 8 pwm 7 4 ?? ??? uart ????? xtal2/ p42 xtal1/ p43 ? ?? ? rc
8 m g87fel2051_4051_6051 ? megawin 2. ?
megawin m g 8 7fel2051_4051_6051 ? 9 3. ? 3.1. ?
10 m g87fel2051_4051_6051 ? megawin 3.2. ? p 1.0~p1.7 12~19 i/o p 1 ?? io ? 0 ? 1 ? ? ? pmos ?????? p1.0 ? p1.1 ? p1.2 p4.2/int3 p1.3 p4.3/int2 p1.4 p 3.4/t0 p1.5 p3.5/t1 p3.0~p3.7 2~3,6~9,11 i/o p 1 ?? io ? 0 ? 1 ? ? ? pmos ?????? mg87fe/l2051/4051/6051 p3 ??? p3.4 p1.4 p3.5 p1.5 reset 1 i ? reset ???? , xtal1 /p4.3 5 i /o ? xtal1 p4.3/int2 p4.3/int2 p1.3 xtal2 /p4.2 4 o ? xtal2 p4.2/int3 p4.2/int3 p1.2 vdd 20 p ? vss 1 0 g
megawin m g 8 7fel2051_4051_6051 ? 11 4. 8051 cpu ? 4.1. cpu ? psw: ?? ? d0h / ??? 0000 - 0000b cy ?? / ? cy=1 cy=0 ac ? d3 d4 ? / ? ac=1 ac=0 ?? f0 ???? 0 / ??? rs1 rs0 ???????? 0~3 ?{? rs1 rs0 ? ? - 128~+127 ? ov=1 ov=0 ?? 255 ???? 0 ? ov=1 ov=0 f1 ???? 1 / ??? p ?????? a 1 ??? p=1 p=0 ?? sp ?? ? 81h / ??? 0000 - 0111b dpl ? ? ? 82h / ??? 0000 - 0000b dph ? ? ? 83h / ??? 0000 - 0000b b ? ? f0h / ??? 0000 - 0000b
12 m g87fel2051_4051_6051 ? megawin 4.2. cpu ? ?????? mg87fe/l2051/40 51/6051 ????? ??????? 2 4 ??? 12 6 ?? 12mhz ????? 1 ? 0.5 ?? ??? s1 s2 s6 ????????? p1 p2 ???? ????? s1 ??????? s4 ??? ? s6 ???? movx ? mg87fe/l2051/4051/6051 ? ?????? ram ??? 4.3. ??? ??? ????????????????? mov a,4fh ;(a) (4fh) ??????? ram ? 128 ????? sfrs ? ?? ????????? ram ? ram ???? ????? r0 r1 ?????? 8 ?? push ?? pop ?????? sp ???? 16 ??? dptr ? ????? mov a,@r0 ;(a) ((r0)) ? ?? (reg) ????????????? ??? mov a,r0 ;(a) (r0) add a,r0 ;(a) (acc)+(r0) ????? acc b dptr ab( ?? ) cy( ? ) ??? ???????????? ?? movc a,@a+dptr ;(a) ((a)+(dptr)) dptr pc ????????? 8051 ?????? ?? ?????????????? mov a,#4fh ;(a) 4fh ?? ???? pc ?????? r el ??????
megawin m g 8 7fel2051_4051_6051 ? 13 ?????? sjmp rel ;pc (pc)+2+rel ?? ???????? setb bit ;(bit) 1
14 m g87fel2051_4051_6051 ? megawin 5. ? mg87fe/l2051/4051/6051 ????????? 8 ? 8 cpu ?? mg87fe/l2051/4051/6051 ??? 5.1. ? mg 87fe/l2051/4051/6051 ????? ap - memory ? cpu ??? iap - memory ? eeprom ?? isp ? isp - memory
megawin m g 8 7fel2051_4051_6051 ? 15 5.2. ?? mg87fe/l2051/4051/6051 ???? ?? 128 ?? 128 ?? 128 ???? sfr 6.2.1 128 ? ram ? 0x00~0x7f ????? ? 6.2.2 128 ? ram ? 0x80~0xff ????? r0 r1 ? 6.2.3 ??? sfr ? 0x80~0xff ??????
16 m g87fel2051_4051_6051 ? megawin 6. ??? 6.1. sfr ?? 0/8 1/9 2/a 3/b 4/c 5/d 6/e 7/f f8h ccap0h 00000000 ffh f0h b 00000000 f7h e8h p4 xxxx11xx ccap0l 00000000 ef h e0h wdtcr 0x000000 ifd 11111111 ifadrh 00000000 ifadrl 00000000 ifmt xxxx0000 scmd xxxxxxxx ispcr 0000xxxx e7h d8h ccon 00xxxxxx cmod 00000000 dfh d0h psw 00000000 p3wkpe 0x000000 p1wkpe 00000000 d7h c8h cfh c0h xicon 00000000 ckcon xxxxx000 c7h b8h ipl xxx00000 saden 00000000 ckcon2 xx001010 bfh b0h p3 11111111 iph 00x00000 b7h a8h ie 0xx00000 saddr 00000000 afh a0h auxr1 0 000 0 000 a7h 98h scon 00000000 sbuf xxxxxxxx 9fh 90h p1 11111111 tstwd 0x000000 acsr 0xx00000 97h 88h tcon 00000000 tmod 00000000 tl0 00000000 tl1 00000000 th0 00000000 th1 00000000 auxr 00000000 ckcon3 xxxxxx0x 8fh 80h sp 00000111 dpl 00000000 dph 00000000 pcon 00010000 87h 0/8 1/9 2/a 3/b 4/c 5/d 6/e 7/f
megawin m g 8 7fel2051_4051_6051 ? 17 6.2. sfr symbol description address bit address and symbol lsb initial value sp stack pointer 81h 00000111b dpl data pointer low 82h 00000000b dph data pointer high 83h 00000000b pcon power control 87h smod smod0 pwmen pof gf1 gf0 p d idl 00010000b tcon timer control 88h 9fh 9eh 9dh 9ch 9bh 9ah 89h 88h 00000000b tf1 tr1 tf0 tr0 ie1 it1 ie0 it0 tmod timer mode 89h gate c/t m1 m0 gate c/t m1 m0 00000000b tl0 timer low 0 8ah 00000000b tl1 timer low 1 8bh 00000000 b th0 timer high 0 8ch 00000000b th1 timer high 1 8dh 00000000b auxr auxiliary 8eh int3h int2h p15fs p14fs p13fs p12fs p11pu p10pu 00000000b ckcon3 clock control 3 8fh - - - - - - pwdex en6tr xxxxxx0xb p1 port 1 90h 97h 96h 95h 94h 93 h 92h 91h 90h 11111111b acsr analog comp. reg. 97h acidx - - acf acen acm2 acm1 acm0 0xx00000b scon serial control 98h 9fh 9eh 9dh 9ch 9bh 9ah 99h 98h 00000000b sm0 /fe sm1 sm2 ren tb8 rb8 ti ri sbuf serial buffer 99h xxxxxxxxb auxr1 auxil iary 1 a2h p14fd * * * gf2 * * * 0 000 0 000 b ie interrupt enable a8h afh aeh adh ach abh aah a9h a8h 0xx00000b ea eac - es et1 ex1 et0 ex0 saddr slave address a9h 00000000b p3 port 3 b0h b7h b6h b5h b4h b3h b2h b1h b0h 1x111111b t1 t0 i nt1 int0 txd rxd iph interrupt priority high b7h px3h/ ptch px2h/ pach - psh pt1h px1h pt0h px0h 00x00000b ipl interrupt priority low b8h bfh beh bdh bch bbh bah b9h b8h xxx00000b - pac - ps pt1 px1 pt0 px0 saden slave address mask b9h 000 00000b ckcon2 clock control 2 bfh oscdr en6tr xcks5 xcks4 xcks3 xcks2 xcks1 xcks0 xx001010b xicon ext. interrupt control c0h c7h c6h c5h c4h c3h c2h c1h c0h 00000000b px3/ ptc ex3 ie3 it3 px2 ex2 ie2 it2 ckcon clock control c7h - - - - - scks2 scks 1 scks0 xxxxx000b psw program status word d0h d7h d6h d5h d4h d3h d2h d1h d0h 00000000b cy ac f0 rs1 rs0 ov - p p3wkpe p3 wakeup enable d6h p37we - p35we p34we p33we p32we p31we p30we 0x000000b p1wkpe p1 wakeup enable d7h p17we p16we p15we p14we p1 3we p12we p11we p10we 00000000b ccon counter control reg. d8h cf cr - - - - - - 00xxxxxxb cmod counter mode reg. d9h cidl pos2 pos1 pos0 cps2 cps1 cps0 ecf 00000000b wdtcr watch - dog - timer e1h wrf - enw clw widl ps2 ps1 ps0 0x000000b control register ifd isp flash data e2h 11111111b ifadrh isp flash address high e3h 00000000b ifadrl isp flash address low e4h 00000000b ifmt isp mode table e5h - - - - ms3 ms2 ms1 ms0 xxxx0000b iaplb iap low boundary note 1 1 1111111b scmd isp serial command e6h xxxxxxxxb ispcr isp control register e7h ispen bs srst cfail - - - - 0000xxxxb p4 port 4 e8h - - - - ebh eah - - xxxx11xxb ccap0l eah 00000000b b b register f0h f7h f6h f5h f4h f3h f2h f1h f0h 0000 0000b ccap0h fah 00000000b
18 m g87fel2051_4051_6051 ? megawin note1: the registers are addressed by ifmt and scmd. please refer the ifmt register description for more detail information. * : ? mg87fe/l6051_4051_2051 v0.10.pdf ??? ( ?? 0 )
megawin m g 8 7fel2051_4051_6051 ? 19 7. i/o 7.1. i/o ? ? ? ?? p10/p11 ???? 7.3. p1 ?? p1 ?? ? 90h / ??? 1111 - 1111b p17~p10 ? cpu 1 0 ? pwm ??? pwm 7.4. p3 ?? p 3 ?? ? b0h / ??? 1x11 - 1111b p37,p35~p30 ? ? cpu 1 0 cpu p36 ???
20 m g87fel2051_4051_6051 ? megawin 7.5. p4 ?? p 4 ?? ? e8h / ??? xxxx - 11xxb p43 ~p42 ? cpu 1 0
megawin m g 8 7fel2051_4051_6051 ? 21 7.6. gpio ? (1). : p1.0 ?? : setb p1.0 ; p1.0 ? 1 c ?? : p10 = 1; // p1.0 ? 1
22 m g87fel2051_4051_6051 ? megawin 8. 8.1. ?? 8.2. ?? ie ? ? ? a8h / ??? 00x0 - 0000b ea: ? ? 0: ? 1: ? eac: ??? 0: ????? 2 int2 ? 33h 1: ??????? 2 int2 33h ? ie2 ?? ?? ex2 ???
megawin m g 8 7fel2051_4051_6051 ? 23 es: ? 0: ? 1: ? et1: ? 1 ? 0: ? 1: ? ex1: ?? 0: ? 1: ? et0 : ? 0 ? 0: ? 1: ? ex0: ? 0 ? 0: ? 1: ? xicon ?? ? ? c0h / ??? 0000 - 0000b px3: ? 3 ? iph px3h ?? ecf=1 ?? ptc ? ecf=0 ?? px3 ptc: pwm ?? iph ptch ?? ecf=1 ?? ptc ? ecf=0 ?? px3 ex3: ? 3 ? 0: ? 1: ?? cmod.ecf ?????? ie3: ? 3 ??? 3 ??????? it3: ? 3 ? 0: ?? auxr.int3h=1 ??? 1: ?? auxr.int3h=1 ?? px2: ? 2 ? , iph px2h ?? ex2: ? 2 ? 0: ? 1: ? ie2: ? 2 ??? 2 ??????? it2: ? 2 ? 0: ?? auxr.int2h=1 ??? 1: ?? auxr.int2h=1 ?? ipl ? ? b8h / ??? x0x0 - 0000b
24 m g87fel2051_4051_6051 ? megawin iph ? ? b7h / ??? 00x0 - 0000b ipl( xicon) iph ? 4 ? iph.x, ipl.x/xicon.x ? ? 8 ????? ie /xicon ? ????? ea ??? ????? iph ? ip l /xicon ? ????????????? ????????????? ? ? ? ?? ? ? ? ? ? ? ? ? ? /int0 /int3 ?? tcon it0 ? ?????? tcon ie0 ie1 , xicon ie2 ie3 ?? ?? ?????????? ?? ? 0 ?? 1 tf0 tf1 ( ????? / ? ? 0 ?? 3 ? ) ?? ???? ri ti ???????? ??? r i ti ???? ? 2 int2 ???? 33h ie. eac=1 ? 33h ???? ??? acsr.acf ie2 ? 0 ie.eac=0 ? 33h ?? 2 int2 ?? ex2 ??? xicon.ie2 0 ? 3 int3 pwm ??? 3bh cmod.ecf=1 ? 3bh ? pwm ????? ccon.cf ie3 ? 0 cmod.ecf=0 ? 3bh ?? 3 int3 ?? ex3 ??? xicon.ie3 0 ? ? , ?????? ?
megawin m g 8 7fel2051_4051_6051 ? 25 ?? ??? s5p2 ???? s5p2 ??? ??? s5p2 ???? s5p2 ???????? ????? lcall ????? ? 1 cpu ???? 2 ???? 3 ? reti ? ie ip ? ? ???? 2 ????? ?? 3 ? ? reti ? ? ie ip ? ???? ? ????????? s5p2 ????? ?????????????? ??????????????? ????????????
26 m g87fel2051_4051_6051 ? megawin 9. ? mg87fe/l2051/4051/6051 ?? / t0 t1 ??? t0/t1 ????????? 12 6 ? ??? 12t ?? 6t ?? . t0/t1 ?? t0/t1 ??????????? ? t0/t1 ??? 1 0 ??? 1 ????? t0/t1 ??????? 9.1. timer0 9.1.1. ?? timer ?? 13 ??? 1 ? 0 ? ( ?? ) timer ?? tfx 1 trx=1 gate=0 intx=1 ? timer ?? t0 t1 ?? 0 ?? 9.1.2. ?? ?? 1 ?? 0 ? 16 ? ? ?
megawin m g 8 7fel2051_4051_6051 ? 27 9.1.3. ?? ???? 8 tlx ? tfx ??? thx ?? tlx thx ???? 0 ?? 1 ?? 2 ?? 9.1.4. ?? ? 1 ?? 3 ??? 0 ?? 3 ? 2 8 tl0 ? / ? ? 0 ? c/t gate tr0 int0 tf0 th0 ?? ??? 1 ? tr1 tf1 th0 ??? 9.1.5. timer0/1 ? tmod ? ?? ? ? 89h / ??? 0000 - 0000b
28 m g87fel2051_4051_6051 ? megawin g ate: 0: ?? trx 1 timer x ? 1: trx 1 /intx ?? timer x ? c/t: 0: ?? 1: ? m1,m0 ??? 0,0: ? 13 ? / 0,1: ? 16 ? / 1,0: ? 8 ??? / ? thx 1,1: t0, tl0 ? 8 ? / , th0 ? 8 ? t1 ?? tcon ? ? ? 88h / ?? ? 0000 - 0000b tf1: t1 ? t1 ?? 1. ? t1 ?? . tr1: 0: ?? t1 1: ? t1 tf0: t0 ? t0 ?? 1. ? t0 ?? . tr0: 0: ?? t0 1: ? t0 ie1: ? 1 ?? 1 ?? 1. ?? 1 ?? . it1: 0: ex1 ??? 0 1: ex1 ??? 0 ie0: ? 0 ?? 0 ?? 1. ?? 0 ?? . it0: 0: ex0 ??? 0 1: ex0 ??? 0
megawin m g 8 7fel2051_4051_6051 ? 29 9.2. ? ? (1). : ? t0 10khz ????? sysclk = 12mhz ?? : t0m0 equ 01h t0m1 equ 02h pt0 equ 02h pt0h equ 02h idl equ 01 h org 0000h jmp main org 0000bh time0_isr: to do reti main: ; mov th0,#(256 - 100) ; ?? 0 ? = sysclk x 100 mov tl0,#(256 - 100) ; anl tmod,#0f0h ; ????? 2 orl tmod,#t0m1 ; clr tf0 ; G? 0 ? orl ip,#pt0 ; ?? 0 ? orl iph,#pt0 h ; setb et0 ; ??? 0 setb ea ; ?? setb tr0 ; ? 0 orl pcon,#idl ; mcu ?? jmp $ c ?? : #define t0m0 0x01 #define t0m1 0x02 #define pt0 0x02 #define pt0h 0x02 #define idl 0x01 void time0_isr(void) interrupt 1
30 m g87fel2051_4051_6051 ? megawin { to do } void mai n(void) { th0 = tl0 = (256 - 100); // ?? 0 ? = sysclk x 100 tmod &= 0xf0; // s ????? 2 tmod |= t0m1; tf0 = 0; // G? 0 ? ip |= pt0; // ?? 0 ? iph |= pt0h; et0 = 1; // ??? 0 ea = 1; // ?? tr0 = 1; // ? 0 pcon =idl; // mcu ?? while(1); }
megawin m g 8 7fel2051_4051_6051 ? 31 (2). : ?? 0 ??? sysclk ( ? t0x12) ?? : t0m0 equ 01h t0m1 equ 02h pt0 equ 02h pt0h equ 02h t0x12 equ 80h org 0000h jmp main org 0000bh time0_ isr: to do reti main: orl auxr, #t0x12 ; ?? 0 ??? sysclk clr tf0 ; G? 0 ? orl ip,#pt0 ; ?? 0 ? orl iph,#pt0h ; setb et0 ; ??? 0 setb ea ; ?? mov th0, #(256 - 240) ; ? 20us mov tl0, #(256 - 240) ; anl tmod,#0f0h ; ?? 0 ??? 2 orl tmod,#t0m1 ; setb tr0 ; ? 0 jmp $ c ?? : #define t0m0 0x01 #define t0m1 0x02 #define pt0 0x02 #define pt0h 0x02 #d efine t0x12 0x80 auxr |= t0x12 // ?? 0 ??? sysclk
32 m g87fel2051_4051_6051 ? megawin tf0 = 0; ip |= pt0; // ?? 0 ? iph |= pt0h; et0 = 1; // ??? 0 ea = 1; // ?? th0 = tl0 = (256 - 240); tmod &= 0xf0; // ?? 0 ??? 2 tmod |= t0m1; tr0 = 1; // ? 0
megawin m g 8 7fel2051_4051_6051 ? 33 9.3. pwm - timer ? ?? pwm ?? 8 ? 9.3.1. pwm ??
34 m g87fel2051_4051_6051 ? megawin 9.3.2. pwm ?? cmod ??? ? ? d9h / ??? 0000 - 0000b cidl: cpu ?? idle 0 idle ? pwm ? 1 idle ? pwm ??? pos[2:0]: pwm ? cps[2:0]: pwm ?? ecf: ? pwm ?? 0 ? ccon.cf ? 1 ? ccon.cf ? ccon ? ? ? d8h / ??? 00xx - xxxxb cf: pwm ?? 0 ?? 0 1 pwm ?? 1 emod.ecf=1 ?????
megawin m g 8 7fel2051_4051_6051 ? 35 1 cr pwm ? 0 ?? 1 cacp0l ??? ? ? eah / ??? 0000 - 0000b cacp0h ??? ? ? fah / ??? 0000 - 0000b
36 m g87fel2051_4051_6051 ? megawin 9.4. pwm ? ( 1 ). : p 1.7 ?? 75% ? ?? pwm_p17 equ 0 70 h pwm_pre_scale_div_8 equ 0 6 h pwmen equ 020h cf equ 0 80 h cr equ 0 40 h org 0000h jmp main main : ; mov c acp0h ,# 192 ; ? ?? 75% mov cacp0l ,# (25 5 - 192 ) ; mov c mod,# pwm_p17 ; p1.7 pwm orl c mod,# pwm_pre_scale_div_8 ; pwm ?? = ??? / 8 anl ccon ,# (0ffh - cf ) ; orl pcon ,# pwnen ; ? pwm i/o orl ccon ,# cr ; pwm jmp $ c ?? : #define pwm_p17 0 x70 #define pwm_pre_scale_div_8 0 x06 #define pwmen 0x20 #de fine cf 0 x80 #define cr 0 x40 void main ( void ) { ccap0h = 192 ; // ? ?? 75% ccap0l = (25 5 - 192 ) ; // c mod | = pwm_p17 ; // p1.7 pwm c mod |= pwm_pre_scale_div_8 ; // pwm ?? = ??? / 8 ccon & = ~cf ; // pcon | = pwmen ; // ? pwm i/o ccon |= cr; // pwm while(1); }
megawin m g 8 7fel2051_4051_6051 ? 37 10. mg87fe/l 2051/4051/6051 ????????????k ???? s buf ???? sbuf ?????? 4 ???1 10.1. uart ? ?? 0 ? rxd p3.0 /txd p3.1 8 ?? / ?? ????? 12 ? ?? 1 10 ? ? rxd p3.0 /txd p3.1 ???? ? 0 8 ??? 1 ?????? scon rb8 ??? ?? 2 11 ? rxd p3.0 /txd p3.1 ??? ?? 0 8 ??? 9 ??? 1 ? 9 ? scon tb8 ??? 9 ? scon rb8 ??????? 32 ? 64 ? ?? 3 a??? 2 ? ??? ?????? sbuf ???????? 0 ri
38 m g87fel2051_4051_6051 ? megawin ? 0 ren ? 1 ???????? ren ? 1 ????? rxd ??? ??? ??????????????? ???????? scon sm2 ?? 2 ?? 3 ??? given ? ? ????? ri ? 1 ????? 1 ? ?????? 1 sm2 ???? 8 given ? ? ??? ?? ri ? 1 ?? 0 sm2 ^ ? ?????? scon fe ? fe sm0 scon ? 7 smod0 pcon.6 ? 1 ? scon.7 ? fe ?? sm0 ? fe ?? 10.2. uart ? scon ? ? ? 98h / ??? 0000 - 0000b fe ??????? uart ???? pcon ? smod0 1 sm0 sm1 ?????? pcon ? smod0 0 sm1 sm0 ????? sm0 sm1 uart ?? 0 0 ?? 0, ?? osc/12 0 1 ?? 1 ,8 uart ? , ? timer1 1 0 ?? 2, 9 uart fosc /64 fosc /32 1 1 ?? 3, 9 uart ? , ? timer1 sm2 ?? 2 3 ????? 2 3 sm2=1 ??? 9 rb8 0 ri ????? 1 sm2=1 ???? ri ??? 0 sm2 0 ren ? ren=1 ?? ren=0 ?? tb8 ?? 2 3 ?? 9 ??? rb8 ?? 2 3 ??? 9 ??? 1 sm2 =0 rb8 ?????? 0 rb8 ti ?? ?? 0 ? 8 ???????? ???? ti ri ???? 0 ? 8 ?????????? . ?? (sm2 ) sbuf ? ?? ? 99h / ??? xxxx - xxxxb
megawin m g 8 7fel2051_4051_6051 ? 39 saddr ? ? ? a9h / ??? 0000 - 0000b saden ? ? ? b9h / ??? 0000 - 0000b ????? saddr saden ????? saden saddr ??? ?? ?? ? saddr saden ? ?? 0 ??? sadd r saden ?? 0 ? given ??? ? ??? ???
40 m g87fel2051_4051_6051 ? megawin 10.3. ? ( 1 ). : ri ??? ?? : ps equ 10h psh equ 10h org 00023h uart_ri_idle_isr: jb ri,ri_isr ; ? jb ti,ti_is r ; ?? reti ; ? ri_isr: ; process clr ri ; ri ? reti ; ? ti_isr: ; process clr ti ; ti ? reti ; ? main: clr ti ; ti ? clr ri ; ri ? setb sm 1 ; setb ren ; 8 ?? 2 ? call uart_baud_rate_setting ; ?? mov ip,#psl ; ?? mov iph,#psh ; setb es ; ?? setb ea ; ?? orl pcon,#idl; ; mcu ?? c ?? : #define ps 0x10 #define psh 0x10
megawin m g 8 7fel2051_4051_6051 ? 41 void uart_ri_idle_isr(void) interrupt 4 { if(r i) { ri=0; // to do ... } if(ti) { ti=0; // to do ... } } void main(void) { ti = ri = 0; sm1 = ren = 1; // 8 ?? 2 ? uart_baud_rate_setting() // ?? ip = psl; // ?? iph = psh; // es = 1; // ?? ea = 1; // ?? pcon |= idl; // mcu ?? }
42 m g87fel2051_4051_6051 ? megawin 11. ?? mg87fe/l2051/4051/6051 ????? ain0 p1.0 ?? ain1 p1.1 ?????? acsr.acen ??????? 10 ? ????????????????? ? acsr acm ????? acm ???? ? acsr.acf ? 1 ?? acf ??????? ? cpu ?? idle ??? 11.1. ??? ?? s4 ???????????????? ????? 1 ?????????? ??? acf 1 ??? ? ? 1 ??????????? ?????? 1 2 ?? 11.2. ??? acsr ????? ? ? 97h / ??? 0000 - 0000b acidx: cpu ?? idle ? 0 idle ???? 1 idle ?? acf: ???? 0 ? 0
megawin m g 8 7fel2051_4051_6051 ? 43 1 acen=1 acm[2:0] ?????? 1 ? ie bit6[eac] ?? ? acen ??? 0 ? 0 ??????? acf ? 1 ?? acm2~acm0 ????
44 m g87fel2051_4051_6051 ? megawin 12. ?? 12.1. wdt ? 12.2. wdt ? wdtcr ? ? ? e1h / ??? 0x00 - 0000b wrf: wdt ? 1 enw: ?? ??? hwenw ? 1: ? , ( ? : ???? ) 0: ? clrw: ? 1 wdt widl: ??? hw idl ? 0: idle ???? wdt 1: idle ??? wdt ps2,ps1,ps0 ??????? hwps2:0 ?
megawin m g 8 7fel2051_4051_6051 ? 45
46 m g87fel2051_4051_6051 ? megawin 12.3. wdt ? (1) : ? wdt ? wdt ??? 1/32 ?? : ps0 equ 01h ps1 equ 02h ps2 equ 04h w idl equ 08h clrw equ 10h enw equ 20h wrf equ 80h anl wdtcr,#(0ffh - wrf) ; wrf ? ( 0) mov wdtcr,#(enw + clrw + ps2) ; ? wdt ? wdt ??? 1/32 c ?? : #define ps0 0x01 #define ps1 0x02 #de fine ps2 0x04 #define widl 0x08 #define clrw 0x10 #define enw 0x20 #define wrf 0x80 wdtcr &= ~wrf; // wrf ? ( 0) wdtcr = (enw | clrw | ps2); // ? wdt ? wdt ??? 1/32 // ps[2:0] | wdt ??? // 0 | 1/2 // 1 | 1/4 // 2 | 1/8 // 3 | 1/16 // 4 | 1/32 // 5 | 1/64 // 6 | 1/128 // 7 | 1/256
megawin m g 8 7fel2051_4051_6051 ? 47 13. ???????? i/o ? vdd ??? 0000h ?? ? isp ???? mg87fe/l2051/4051/6051 ?????y wdt ? 13.1. ?
48 m g87fel2051_4051_6051 ? megawin 14. ? mg87fe/l2051/4051/6051 ???? idle ?????? pcon ?? 14.1. ??? ?? ??? pcon. idl ???????? cpu ??? cpu ?? ram sp pc psw acc i/o ????? ??? ???? ??????????? ???? pcon.0 ????????? ??????????????? 0 ? 1 pwm ???? ?????? p1.0 p1.1 ??? 0 ? 1 ? auxr.p10pu auxr.p11pu 1 14.3. ?? ??? pcon. pd ???????? flash ???????? vdd ? ram ????? sfr ???????y???????? io gpio ?? ???? ?????? 4 ????? 14.4. ? ? /int0 p3.2 /int1 p3.3 /int2 p4.3 /int3 p4.2 ???????? ?????????? /int2 p4.3 ???? /int2 ? xicon.ex2=1 ? p4.3 ??? ???? /int3 p4.2 pwm ?? /int3 ? xicon.e x3=1 ? p4.2 ??????? ????? ckcon3.pwdex=0 ???????????? ???????? cpu ??????????? ????????????????? ????? ckcon3.pwdex=1 ??????? cpu ? ??????
megawin m g 8 7fel2051_4051_6051 ? 49 14.5. ? pwdex=0 ???? rst ??????? ???????? cpu ?????????? rst ???????????? rst ??????? ??? idle ??????????? idle ???????????? ram ? i/o ???? ??? i/o ?? idl e ?? i/o ???? nop ?? 14.6. ? ? p1wkpe p3wkpe ?? p1 p3 ?? p3.2/int3 p3.3/int1 ??? p3wkpe ?? p3.2 p3.3 ??? p4.2/int3 p4.3/int2 ? ????? gpio ? pwdex=0 ??? gpio ???????? ???? cpu ? ???????????? cpu ????????????? gpio ??? ? 14.7. ??? pcon ? ? ? 87h / ??? 000x - 0000b smod: ??? 0 ? 1 ???? 1 2 3 pwmen: pwm ? 0: pwm - timer ? 1: pwm - timer pwm ? pos[2:0] ??? pof : ?? 0 1 ? ? 1 ?? gf1 gf0 ??? pd ? power - down 0 ?? power - down ??? 0 1 1 ?? idl ?? idle ?? 0 ?? idle ??? 0 1 1 idle ??
50 m g87fel2051_4051_6051 ? megawin p1wkpe ???? ? d7h / ??? 0000 - 0000b p1nwkp: p1 ? 0 ?? 1 ????? io ?????? power - down idle ?? p3wkpe ???? ? d6h / ??? 0000 - 0000b p3nwkp: p3 ? (p3.6 ?? ) 0 ?? 1 ????? io ?????? power - down idle ??
megawin m g 8 7fel2051_4051_6051 ? 51 15. ??? 15.1. ??? 15.2. ??? ckcon ???? ? c7h / ??? xxxx - x000b scks2~scks0: ????? ckcon2 ???? ? bfh / ??? xx00 - 1010b oscdr: ??? ?? ? / 0 ? 48mhz 1 ? emi( n????? ) en6tr 12t/6t ??? ?? ? / ????
52 m g87fel2051_4051_6051 ? megawin ckcon3.en6tr ???? 0 m cu 12t ?? 1 mcu 6t ?? xcks5~xcks0 ? isp/iap ??t?? xtal@12t xtal@6t xcks5~0 1mhz 0.5mhz 000000b 2mhz 1mhz 000001b 3mhz 2mhz 000010b 4mhz 3mhz 000011b ??? 001010b(xtal=11mhz@12t) ckcon3 ???? ? 8fh / ??? xxxx - xx0xb pwdx: ?? (power - down) ?? 0 ??? 1 ? en6tr 12t/6t ??? ?? ? / ???? ckcon2.en6tr ???? 0 mcu 12t ?? 1 mcu 6t ??
megawin m g 8 7fel2051_4051_6051 ? 53 16. ? ifd ? ? e2h / ?? 1111 - 1111b 7 6 5 4 3 2 1 0 ifd ? isp/iap ?? isp/iap ?? ifd ??? iaplb ? ifd ? iaplb ? ifadrh isp/iap ? ? ? e3h / ??? 0000 - 0000b 7 6 5 4 3 2 1 0 ? ifadrh isp/iap ??? ifadr l isp/iap ? ? ? ? e4h / ??? 0000 - 0000b 7 6 5 4 3 2 1 0 ? ifadrl isp/iap ?????? ifadrl ? ifmt ??? ? e5h / ??? xxxx - 0000b 7 6 5 4 3 2 1 0 (00000) ??? bit[ 2 :0] ?? ?? ? ? iaplb ??? ???? / ??? 1111 - 1111b 7 6 5 4 3 2 1 0 iaplb iaplb ? iap ????? flash ?? 512 ?? iaplb ??? iaplb ? ifmt = 0x05; ispcr = 0x80;
54 m g87fel2051_4051_6051 ? megawin scmd = 0x46; scmd = 0xb9; // ? ifd ?? iaplb ? ia plb ? ifd = ??; // iaplb ?? ifd ifmt = 0x04; ispcr = 0x80; scmd = 0x46; scmd = 0xb9; iap iaplb isp ??? iap ?? = iaplb * 256 iap ?? = isp ?? C 1 iaplb=0x12 isp ?? 0x1c00 iap ? 0x1200~0x1bff ?? iaplb ?? isp ?? scmd ?? ?? e6h / ?? xxxx - xxxxb 7 6 5 4 3 2 1 0 isp/iap/iaplb ?? scmd ? ispcr.7 ? 1 scmd ? 0x46 0xb9 ? isp ispcr ?? ?? e7h / ??? 0000 - xxxxb ispen isp/iap ? 0 ?? isp/iap / / 1 ? isp/iap / / swbs ? 0 ap 1 isp swrst ? 0 ? 1 ? ?? cfail isp/iap ??? 0 isp/iap ? 1 isp/iap ? mg87fe/l2051/4051/6051 idle ??? isp ?? cpu ?? flash isp ??? isp ?? cpu ??? isp ???? isp ???? isp ???????? ckcon2.xcks[5:0] ?????? / ?
megawin m g 8 7fel2051_4051_6051 ? 55 17. ??? mg87fe/l2051/4051/6051 ? ap - memory ? 2k/2051 4k/4051 6k/6051 iaplb isp ??? flash ?? iap ??? isp ? iap ? iaplb ? mcu ? ap ????? iap ap i sp ??? mcu isp ? ap iap ? isp ??
56 m g87fel2051_4051_6051 ? megawin 17.1. iap ? isp ???? iap , ???? ??? ? orl ckcon2,#011h ; ckcon2 [ 5 :0]=011 h , mcu 11.0592mhz mov ispcr,#100000 00 b ; ispcr.7=1, isp mov ifmt,#03h ; ? ? ?? mov ifadrh,?? ; [i fadrh,ifadrl] ??? mov ifadrl,?? ; ? iap mov scmd,#46h ; mov scmd,#0b9h ; ????? ?? ? orl ckcon2,#011h ; ckcon2 [ 5 :0]=011 h , mcu 11.0592mhz mov ispcr,#100000 00 b ; ispcr.7=1, isp mov ifmt,#02h ; ? ?? mov ifadrh,?? ; [ifadrh,ifadrl] ???? mov ifadrl,?? ; ! ??? iap mov ifd,?? ; ifd ? mov scmd,#46h ; mov scmd,#0b9h ; ????? ?? ? orl ckcon2,#011h ; ckcon2 [ 5 :0]=011 h , mcu 11.0 592mhz mov ispcr,#100000 00 b ; ispcr.7=1, isp mov ifmt,#01h ; ? ?? mov ifadrh,?? ; [ifadrh,ifadrl] ???? mov ifadrl,?? ; ! ??? iap mov scmd,#46h ; isp mov scmd,#0b9h ; ????? mov a,ifd ; ? ifd ? . .. ...
megawin m g 8 7fel2051_4051_6051 ? 57 18. ???? auxr ??? ?? 8eh / ??? 0000 - 0000b int3h int3 ? 0 int3 ?? p4.2 ?? 1 int3 ?? p4.2 ? int2h int2 ? 0 int2 ?? p4.2 ?? 1 int2 ?? p4.2 ? p15fs p1.5 ? 0 p1.5 p3.5 ?? 1 p1.5 p3.5/int1 p3.5 p1.5 p1 4fs p1.4 ? 0 p1.4 p3.4 ?? 1 p1.4 p3.4/int0 p3.4 1.4 p13fs p1.3 ? 0 p1.3 p4.3 ?? 1 p1.3 p4.3/int2 p4.3 p1.4 mcu ?? xtal1 ? gpio ? p12fs p1.2 ? 0 p1.2 p4.2 ?? 1 p1.2 p4.2/int3 p4.2 p1.2 mcu ?? xtal2 ? gpio ? p11pu p1.1 ? 0 p1.1 ???? 1 p1.1 ?? p10pu p1.0 ? 0 p1.0 ???? 1 p1.0 ?? p1.1 p1.0 ?? n - mos ?? auxr p1.1/p1.0 ? p1.1 p1.0 gpio p11pu/p10pu ???????? cpu ? ? auxr1 ??? 1 ?? a2h / ??? 0 000 - 0 000 b 7 6 5 4 3 2 1 0 p14fd * * * gf2 * * * p14fd p1.4 0 1 gf2 ??? 2 * : ? mg87fe/l6051_4051_2051 v0.10.pdf ??? ( ?? 0 )
58 m g87fel2051_4051_6051 ? megawin 19. ?? lock rom ????? hwbs ?? isp ????? isp hwbs2 isp ????????? isp ??? en6t mcu 6t/12t ????? 6t ?? oscdn t??? emi ????
megawin m g 8 7fel2051_4051_6051 ? 59 20. ?? mg87fe /l2051/4051/6051 ?? ?? ?? - 55 ~ +125 c ? - 65 ~ +150 c io ??????? - 0.5 ~ vdd+0.5 v vdd ????? - 0.5 ~ +6.0 v ?? 400 ma io ?? 40 ma mg87fe /l2051/4051/6051 ?? ?? ?? - 55 ~ +125 c ? - 65 ~ +150 c io ??????? - 0.3 ~ vdd+0.3 v vdd ????? - 0.3 ~ +4.2 v ?? 400 ma io ?? 40 ma ???? ?? ??? ? ????? ?
60 m g87fel2051_4051_6051 ? megawin 21. 21.1. ? vdd=5.0v vss=0v ta=25 c 12t ?? v ih1 ?? ih2 ?? il1 ?? il2 ??? ih ?? pin = vdd 0 10 ua i il ?? pin =0.4v 20 50 ua i h2l ?? pin =1.8v 250 500 ua i oh1 ?? pin =2.4v 150 220 ua i ol1 ?? pin =0.4v 12 ma i op idle ?? pd ?? rst ?? vss=0v ta=25 c 12t ?? v ih1 ?? ih2 ?? il1 ?? il2 ??? ih ?? pin = vdd 0 10 ua i il ?? pin =0.4v 7 3 0 ua i h2l ?? pin =1.8v 100 25 0 ua i oh1 ?? pin =2.4v 40 7 0 ua i ol1 ?? pin =0.4v 8 ma i op idle ?? pd ?? rst ??
megawin m g 8 7fel2051_4051_6051 ? 61 22. ??
62 m g87fel2051_4051_6051 ? megawin
megawin m g 8 7fel2051_4051_6051 ? 63 23. ? rn ? r0~r7 direct 8 ? 1. ? (00~7f) ?? 2. ??? (80~ff) ?? p0,psw,tmod, @ri ?? r0 r1 ? ram #data 8 #data16 16 addr16 16 ??????? 64k addr11 11 ??????? 2k rel ? 8 ????? bit 1 bit: ???? a ? acc c cy ? ac ? bb ? b0~b7 d (4bit) f0 0 i pc sp ? b ? b dptr ??? @ ?? $ ?? reg ? * 6t ?? : 1 ? = 6 ? * 12t ?? : 1 ? =12 ? ? ? ? ? mov a, r n acc ? ? ? ? ? ? ? ? ? ? ?
64 m g87fel2051_4051_6051 ? megawin mov direct,#data direct ? data 3 2 mov @ri,a ri ? acc 1 1 mov @ri,direct ri ? direct 2 2 mo v @ri,#data ri ? data 2 1 mov dptr,#data16 dptr ? 16bit data 3 1 movc a,@a+dptr acc ? (a+dptr) ?? 1 2 movc a,@a+pc acc ? (a+pc) ?? 1 2 movx a,@ri acc ? ? data 1 2 movx a,@dptr acc ? ? 16bit data 1 2 movx @ri,a ? data ? acc 1 2 movx @dptr,a ? 16bit data ? acc 1 2 push direct ? ? direct 2 2 pop direct direct ? ? 2 2 xch a,rn a rn 1 1 xch a,direct a direct 2 1 xch a,@ri a ri 1 1 xchd a,@ri a ri ?? 1 1 add a,rn acc ? acc+rn 1 1 add a,direct acc ? acc+direct 2 1 add a,@ri acc ? acc+ri 1 1 add a,#data acc ? acc+data 2 1 addc a,rn acc ? acc+rn+c 1 1 addc a,direct acc ? acc+direct+c 2 1 addc a,@ri acc ? acc+ri+c 1 1 addc a,#data acc ? acc+data+c 2 1 subb a,rn acc ? acc - rn - c 1 1 subb a,direct acc ? acc - direct - c 2 1 subb a,@ri acc ? acc - ri - c 1 1 subb a,#data acc ? acc - data - c 2 1 inc a acc ? acc +1 1 1 inc rn rn ? rn +1 1 1 inc direct direct ? direct +1 2 1 inc @ri ri ? ri +1 1 1 inc dptr dptr ? dptr +1 1 2 dec a acc ? acc - 1 1 1 dec rn rn ? rn - 1 1 1 dec d irect direct ? direct - 1 2 1 dec @ri ri ? ri - 1 1 1 mul ab ?? b, ? a 1 4 div ab acc b, ? acc, b 1 4 da a acc ?? 1 1
megawin m g 8 7fel2051_4051_6051 ? 65 ? anl a,rn acc ? acc and rn 1 1 anl a,direct acc ? acc and direct 2 1 anl a,@ri acc ? acc and ri 1 1 anl a,#d ata acc ? acc and data 2 1 anl direct,a direct ? direct and acc 2 1 anl direct,#data direct ? direct and data 3 2 orl a,rn acc ? acc or rn 1 1 orl a,direct acc ? acc or direct 2 1 orl a,@ri acc ? acc or ri 1 1 orl a,#data acc ? acc or data 2 1 orl d irect,a direct ? direct or acc 2 1 orl direct,#data direct ? direct or data 3 2 xrl a,rn acc ? acc xor rn 1 1 xrl a,direct acc ? acc xor direct 2 1 xrl a,@ri acc ? acc xor ri 1 1 xrl a,#data acc ? acc xor data 2 1 xrl direct,a direct ? direct xor acc 2 1 xrl direct,#data direct ? direct xor data 3 2 clr a ? acc 1 1 cpl a ? 1 1 rl a ?? 1 1 rlc a ? c 1 1 rr a ?? 1 1 rrc a ? c 1 1 swap a ??? 1 1 ? clr c 1 1 clr bit ? 2 1 setb c ? 1 1 setb bit ?? 2 1 cpl c ? 1 1 cpl bit ?? 2 1 anl c,bit c ? c and bit 2 2 anl c,/bit c ? c and bit( ) 2 2 orl c,bit c ? c or bit 2 2 orl c,/bit c ? c or bit( ) 2 2 mov c,bit c ? bit 2 1 mov bit,c bit ? bit 2 2 ?? jc rel c=1 ? rel 2 2 jnc rel c=0 ? rel 2 2 jb bit,rel bit=1 ? rel 3 2
66 m g87fel2051_4051_6051 ? megawin jnb bit,rel bit=0 ? rel 3 2 jbc bit,rel bit=1 ? rel, bit 3 2 ? acall addr11 ?? 3 2 lcall addr16 ?? 3 2 ret ??? 1 2 reti ? 1 2 ajmp addr11 ?? 2 2 ljmp addr16 ?? 3 2 sjmp rel ?? 2 2 jmp @a+dptr ? 1 2 jz rel acc=0 rel 2 2 jnz rel acc 0 rel 2 2 cjne a,direct,rel acc direct rel 3 2 cjne a,#data,rel acc data rel 3 2 cjne rn,#data,rel rn data rel 3 2 cjne @ri,#data,rel ri data rel 3 2 djnz rn,rel (rn - 1) 0 rel 2 2 djnz direct,rel (direct - 1) 0 rel 3 2 nop ? 1 1
megawin m g 8 7fel2051_4051_6051 ? 67 24. ?? v1.00 ? 200 9/02/14 v1.01 1 ? ???? 2009/04/17 2 cus - timer - > pwm - timer v1.0 2 ? auxr1 ????? 20 1 0/0 9 /1 4 a1.0 ? 2014/03/10
68 m g87fel2051_4051_6051 ? megawin ??? megawin megawin technology co., ltd.  ?? ????????????????? ???????????????? ???????????? ? ??????? / C ??? / ? ??? ??????? ecn ??


▲Up To Search▲   

 
Price & Availability of MG87FL6051

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X